local unitName  =  "armpw"

local unitDef  =  {
--Internal settings
    buildpic = "ARMPW.DDS",
    Category = "KILLABLE",
    ObjectName = "armpw.3do",
    name = "PeeWee",
    Side = "TANKS",
    UnitName = "armpw",
    script = "armpw.cob",
    
--Unit limitations and properties
    BuildTime = 10,
    Description = "Short range unit",
    MaxDamage = 800,
    RadarDistance = 0,
    SightDistance = 400,
    SoundCategory = "TANK",
    Upright = 0,
    
--Energy and metal related
    BuildCostEnergy = 0,
    BuildCostMetal = 50,
    
--Pathfinding and related
    Acceleration = 0.15,
    BrakeRate = 0.1,
    FootprintX = 2,
    FootprintZ = 2,
    MaxSlope = 15,
    MaxVelocity = 2.5,
    MaxWaterDepth = 20,
    MovementClass = "Default2x2",
    TurnRate = 900,
    
--Abilities
    Builder = 0,
    CanAttack = 1,
    CanGuard = 1,
    CanMove = 1,
    CanPatrol = 1,
    CanStop = 1,
    LeaveTracks = 0,
    Reclaimable = 0,

	customparams = {
		unitcost = "1",
	},
	
--Weapons and related
    ExplodeAs = "TANKDEATH",

	weapons = {
		[1] = {
			def = "emg",
			BadTargetCategory = "UNKILLABLE",
			NoChaseCategory = "UNKILLABLE",
			OnlyTargetCategory = "KILLABLE",						
		},
	},
}

local weaponDefs = {
		emg = {
			name = "peewee",
			weapontype = "Cannon",
			accuracy = 10,
			areaofeffect = 8,
			avoidfeature = false,
			avoidfriendly = false,
			canattackground = true,
			collidefriendly = false,
			collisionsize = 8,
			commandfire = false,
			craterboost = 0,
			cratermult = 0,
			edgeeffectiveness = 0,
			explosionspeed = 128,
			impulseboost = 0.0,
			impulsefactor = 0.0,
			intensity = 0.69999998807907,
			noselfdamage = true,
			size = 1.75,
			soundstart = "flashemg",
			range = 180,
			reloadtime = 0.31000000238419,
			rgbcolor = "1 0.95 0.4",
			turret = true,
			weaponvelocity = 500,
			--burst = 3,
			--burstrate = 0.10000000149012,
			explosiongenerator = "custom:EMG_HIT",
			--firestarter = 100,
			--sprayangle = 1180,
			--tolerance = 5000,
			--weapontimer = 0.10000000149012,
			damage = {
				default = 55,
				unkillable = 0,				
			},
		},
	}

unitDef.weaponDefs = weaponDefs

return lowerkeys({ [unitName]  =  unitDef })